{% extends 'admin/common/base.html'%}
{% block head%}
<style>
    .login-container .logobox{
        height: auto !important;
    }
    .logobox p{
        margin: 0;
    }
</style>
{% endblock%}
{%block body%}
<div class="login-container animated fadeInDown">
    <form action="{{url_for('admin.login')}}" method="post" novalidate>
        {{form.csrf_token}}
        <div class="loginbox bg-white">
            <div class="loginbox-title">SIGN IN</div>

            {% for message in get_flashed_messages() %}
            <div class="loginbox-textbox red" style="padding-top: 20px;padding-bottom: 0;">
                {{message}}
            </div>
            {% endfor %}

            <div class="loginbox-textbox">
                {{form.username(class='form-control', placeholder='username')}}
            </div>
            {% if form.username.errors %}
            <div class="loginbox-textbox red">
                {% for msg in form.username.errors%}
                {{msg}}
                {% endfor %}
            </div>
            {% endif %}
            <div class="loginbox-textbox">
                {{form.password(class='form-control', placeholder='password')}}
            </div>
            {% if form.password.errors %}
            <div class="loginbox-textbox red">
                {% for msg in form.password.errors%}
                {{msg}}
                {% endfor %}
            </div>
            {% endif %}
            <div class="loginbox-submit">
                <!-- <input class="" value="Login" type="submit"> -->
                {{form.submit(class='btn btn-primary btn-block')}}
            </div>
        </div>
        <div class="logobox">
            <p class="text-center">Copyright © 2023</p>
        </div>
    </form>
</div>
{% endblock %}